<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>音乐</title>
	<link rel="stylesheet" type="text/css" href="css/music.css" />
	<link rel="stylesheet" href="css/smusic.min.css">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	<!--<link rel="stylesheet" type="text/css" href="css/smusic.css">-->
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <style>
        .container-fluid {
            padding-right: 0px;
            padding-left: 0px;
            margin-right: 0px;
            margin-left: 0px;
        }
         body {
            font: 14px / 1.5 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', 'Microsoft Yahei', Arial, sans-serif;
        }

        h1 {
            font-size: 36px;
            color: #fff;
            text-align: center;
        }

        .homepage {
            color: #fff;
            text-align: center;
            font-size: 18px;
        }

        .homepage a {
            color: #fff;
        }

        .wrapper {
            width: 100%;
            height: 90%;
        }

        #smusic {
            width: 50%;
            height: 50%;
            margin-left: 25%;
            margin-top: 100px;
        }

        .button-group {
            text-align: center;
        }

        .button-group button {
            display: inline-block;
            height: 36px;
            line-height: 20px;
            padding: 8px 16px;
            min-width: 100px;
            text-align: center;
            border: 1px solid #ccc;
            cursor: pointer;
            font: inherit;
        }

        .button-group button:disabled {
            opacity: .5;
            cursor: not-allowed;
        }

        .gitbtns {
            margin: 20px;
            text-align: center;
        }

        .gitbtns iframe {
            display: inline;
            width: auto;
            max-width: 120px;
        }
        /*.smusic-container{*/
            /*width: 100%;*/
            /*height: 100%;*/
        /*}*/
        /*.smusic-container>.smusic-main .smusic-music-thumbnail{*/
        	/*width: 60%;*/
        	/*height: 70%;*/
        /*}*/
        .dropdown-menu{
         	min-width: 100px;
         	margin: 2px 100px 0;
         }
    </style>
</head>
<body>
        <div class="container-fluid">
            <nav class="navbar navbar-default" role="navigation" style="margin-bottom:0px">
                <div class="nav_box">
                    <ul class="nav navbar-nav" style="width: 100%;margin-bottom: 0px;margin-left: 10%">
                        <li><a href="sy.html">首页</a></li>
                        <li class="dropdown active" >
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                音乐风格
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li><a href="music.html" >流行音乐</a></li>
                                <li><a href="music2.html" >经典老歌</a></li>
                                <li><a href="music3.html">民谣</a></li>
                            </ul>
                        </li>
                        <li><a href="VIP.html">VIP</a></li>
                        <li><a href="about.html">关于我们</a></li>
                        <li><a href="form.html" id="islogin"></a></li>
                    </ul>
                </div>
            </nav>
        </div>
    <article class="wrapper">
        <div id="smusic"></div>
    </article>
    <div class="footer"><p style="margin: 0 0 0;">北京华善盛世网络科技有限公司</p><p style="margin: 0 0 0;">京网文[2018] 2280-230 号</p></div>

    <script src="js/songList2.js"></script>
    <script src="js/mo.js"></script>
    <!--<script src="../dist/js/smusic.js"></script>-->
     <script src="js/smusic.min.js"></script>
    <script>

        var x = function (id) {
            return document.getElementById(id)
        }

        var smusic = SMusic(songList, {
            container: x('smusic'),
            panel: 'list',
            autoPlay: false
        });
        smusic.init();

        $.ajax({
            url: 'islogin',
            type:"GET",
            dataType: "JSON",
            success: function(result) {
                if(result.code == '1') {
                    //已登录
                    $("#islogin").text(result.data);
                    $("#islogin").attr("disabled",true).css("pointer-events","none");
                }else {
                    $("#islogin").text("登录/注册");
                }
            },
            error: function(result, status) {
                $("#islogin").text("登录/注册");
            }
        });

//
//
//
//
//        var newSong = {
//            title: '向天再借五百年',
//            singer: '韩磊',
//            audio: 'http://zjdx1.sc.chinaz.com/Files/DownLoad/sound1/201506/6039.mp3',
//            thumbnail: 'http://p1.music.126.net/MsjB1mwEjSzidqcesbwz3w==/591537255755598.jpg',
//            lyric: null
//        };
//
//        $('getCurrentMusic').addEventListener('click', function () {
//            var data = smusic.getCurrentInfo();
//            var info = '';
//            if (data) {
//                for (var k in data) {
//                    if (['audio', 'lyric', 'thumbnail'].indexOf(k) === -1) {
//                        info += (k + '：' + data[k] + '\n');
//                    }
//                }
//                console.info(info);
//            }
//        });
//
//        $('addMusicToList').addEventListener('click', function () {
//            console.log("追加前：" + smusic.playList.length + "首");
//            smusic.addSong(newSong, function () {
//                newSong = null; //防止重复追加
//            });
//            this.setAttribute('disabled', 'disabled');
//            console.log("追加后：" + smusic.playList.length + "首")
//        });


        //页面跳转
//        function goMusic(index) {
//            window.location.href="music.html?index="+index;
//        }

    </script>
</body>
</html>
